<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" layout:decorator="layout/base">
<head>
	<title>渠道商编辑</title>
    <script type="text/javascript" th:src="@{/assets/js/plugins/pickers/daterangepicker.js}"></script>
<style>
	.col-center-block {  
	    float: none;  
	    display: block;  
	    margin-left: auto;  
	    margin-right: auto;  
	}  
	
	.rowDistance{
		padding-top:20px;
	}
</style>  
</head>

<body>
	<!-- Page header -->
	<div class="page-header" layout:fragment="page-header">
		<div class="page-header-content">
			<div class="page-title">
				<h4><i class="icon-arrow-left52 position-left"></i> <span class="text-semibold" th:text="#{web.name}">管理系统</span> - 渠道商编辑</h4>
			</div>
		</div>
	</div>
	<!-- /page header -->

	<!-- Main content -->
	<div class="content-wrapper" layout:fragment="content">
		
		<div class="panel panel-flat">
					<div class="panel-heading">
						<h6 class="panel-title">编辑渠道商</h6>
						<div class="heading-elements">
							<ul class="icons-list">
		                		<li><a data-action="collapse"></a></li>
		                	</ul>
	                	</div>
					</div>

	                <div class="panel-body col-md-offset-2">
	                	<form id="edit" class="form-horizontal" action="#">
							<div class="form-group">
								<div class="row">
									<label class="col-lg-2 control-label">来源<span class="text-danger">*</span>:</label>
									<div class="col-lg-3">
										<div class="col-md-15">
											<select th:field="*{customer.source}"  name="source" class="select form-control input-xs">
												<option th:value="-1" th:text="请选择来源"></option>
												<option th:each="source : ${sourceList}" th:value="${source.code}" th:text="${source.name}"></option>
											</select>
										</div>
									</div>

									<label class="col-lg-2 control-label">渠道商:</label>
									<div class="col-lg-4">	
										<div class="col-md-15">
											<select name="recommendDistributorId" multiple="multiple" th:field="*{customer.recommendDistributorId}" class="select form-control input-xs">
												<option value="-1" >无</option>
												<option th:each="dis : ${distributorList}" th:value="${dis.id}" th:text="${dis.displayName}"></option>
											</select>
										</div>
									</div>
								</div>
								
								<div class="row rowDistance">
									<label class="col-lg-2 control-label">代理商编号<span class="text-danger">*</span>:</label>	
									<div class="col-lg-3">
										<div class="col-md-15">
										<input name="code" th:value="${customer.code}" type="text" placeholder="代理商编号" class="form-control"  required="true"/>
										</div>
									</div>
									
									<label class="col-lg-2 control-label">渠道商店铺名称<span class="text-danger">*</span>:</label>	
									<div class="col-lg-3">
										<div class="col-md-15">
											<input name="shopName" th:value="${customer.shopName}" type="text" placeholder="店铺名称" class="form-control" required="true" maxlength="50"/>
										</div>
									</div>
								</div>
								
								<div class="row rowDistance">
									<label class="col-lg-2 control-label">经营者姓名<span class="text-danger">*</span>:</label>	
									<div class="col-lg-3">
										<div class="col-md-15">
											<input name="name" th:value="${customer.name}" type="text" placeholder="经营者姓名" class="form-control" required="true" maxlength="50"/>
										</div>
									</div>
									
									<label class="col-lg-2 control-label">身份证号码<span class="text-danger">*</span>:</label>	
									<div class="col-lg-3">
										<div class="col-md-15">
											<input name="idCardNo" th:value="${customer.idCardNo}" type="text" placeholder="身份证号码" class="form-control"  required="true" maxlength="18"/>
										</div>
									</div>
									
								</div>
								
								<div class="row rowDistance">
									<label class="col-lg-2 control-label">性别<span class="text-danger">*</span>:</label>
										<div class="col-lg-3">
											<div class="col-md-15">
												<select name="sex" th:field="*{customer.sex}" class="select form-control input-xs">
													<option th:value="-1" th:text="请选择性别"></option>
													<option th:each="sex : ${sexList}" th:value="${sex.code}" th:text="${sex.name}"></option>
												</select>
											</div>
										</div>
								</div>
								
								<div class="row rowDistance">
									<label class="col-lg-2 control-label">电话号码:</label>
									<div class="col-lg-3">
										<div class="col-md-15">
											<input th:value="${customer.phoneNo}" id="phoneNo" name="phoneNo" type="text" placeholder="电话号码" class="form-control" number="true" maxlength="100"/>
										</div>
									</div>
									
									<label class="col-lg-2 control-label">固定电话号码:</label>
									<div class="col-lg-3">
										<div class="col-md-15">
											<input th:value="${customer.telephoneNo}" id="telephoneNo" name="telephoneNo" type="text" placeholder="固定电话号码" class="form-control" number="true" maxlength="100"/>
										</div>
									</div>
								</div>
								
								<div class="row rowDistance">
									<label class="col-lg-2 control-label">合作开始时间<span class="text-danger">*</span></label>
									<div class="col-lg-3">
										<div class="col-md-15">
											<input type="text" id="cooperationStartTime" readonly="readonly" name="cooperationStartTime" class="form-control" required="true" placeholder="合作开始时间" />
										</div>
									</div>

									<label class="col-lg-2 control-label">合作结束时间<span class="text-danger">*</span></label>									
									<div class="col-lg-3">
										<div class="col-md-15">
											<input type="text" id="cooperationEndTime" readonly="readonly" name="cooperationEndTime" class="form-control" required="true" placeholder="合作结束时间" />
										</div>
									</div>
								</div>
								
								<div class="row rowDistance">
									<label class="col-lg-2 control-label">权益<span class="text-danger">*</span></label>
									<div class="col-lg-3">
										<div class="col-md-15">
											<select name="levelId" th:field="*{customer.levelId}" class="select form-control input-xs">
												<option th:value="-1" th:text="请选择权益"></option>
												<option th:each="distributorLevel : ${levels}" th:value="${distributorLevel.id}" th:text="${distributorLevel.levelName}"></option>
											</select>
										</div>
									</div>
								</div>
								
								<div class="row rowDistance">
									<label class="col-lg-2 control-label">店铺面积:</label>
									<div class="col-lg-3">
										<div class="col-md-15">
											<input name="shopArea" placeholder="店铺面积" th:value="${customer.shopArea}" type="text" class="form-control"></input>
										</div>
									</div>
									
									<label class="col-lg-2 control-label">店铺员工:</label>
									<div class="col-lg-3">
										<div class="col-md-15">
											<input name="shopStaff" placeholder="店铺员工" th:value="${customer.shopStaff}" type="text" class="form-control"></input>
										</div>
									</div>
								</div>
								
								<div class="row rowDistance">
									<label class="col-lg-2 control-label">持卡人姓名:</label>
									<div class="col-lg-3">
										<div class="col-md-15">
											<input name="customerName" placeholder="持卡人姓名" th:value="${customer.customerName}" type="text" class="form-control"></input>
										</div>
									</div>
									
									<label class="col-lg-2 control-label">卡号:</label>
									<div class="col-lg-3">
										<div class="col-md-15">
											<input name="bankCardNum" placeholder="卡号" th:value="${customer.bankCardNum}" type="text" class="form-control"></input>
										</div>
									</div>
								</div>
								
								<div class="row rowDistance">
									<label class="col-lg-2 control-label">地址:</label>
									<div class="col-lg-8">
										<div class="col-md-15">
											<input name="address" placeholder="地址" th:value="${customer.address}" type="text" class="form-control"></input>
										</div>
									</div>
								</div>
								
								<div class="row rowDistance">
									<div class="form-group">
										<label class="col-lg-2 control-label">其他情况说明</label>	
										<div class="col-lg-8">
											<div class="col-md-15">
												<textarea th:text="${customer.remark}" name="remark" rows="3" cols="20" placeholder="其他情况说明" class="form-control"></textarea>
											</div>
										</div>
									</div>
								</div>
								
							</div>
							
							 <div class="col-md-offset-4">
								<input name="id" type="hidden" th:value="${customer.id}"/>
								<input id="type" name="type" type="hidden" value="1"/>
								<input id="auditStatus" name="auditStatus" type="hidden" value="1"/>
								<input name="oauth_id" type="hidden" th:value="${customer.oauthId}"/>
	                        	<button type="button" id="submit" class="btn btn-primary">保存<i class="icon-search position-right"></i></button>
	                        </div>
                        </form>
                        
                        <input type="hidden" id="cooperationStartTimeHidden" th:value="${customer.cooperationStartTime}" />
                        <input type="hidden" id="cooperationEndTimeHidden" th:value="${customer.cooperationEndTime}" />
				    </div>
				</div>
		
		<!-- /table -->
		<script type="text/javascript" th:src="@{/oss/js/distributorEdit.js}"></script>
	</div>
	<!-- /main content -->

</body>
</html>

